package com.fjb.controller.product;


import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fjb.common.entity.HttpCode;
import com.fjb.common.entity.JsonResult;
import com.fjb.common.enums.product.DeliveryModeStatus;
import com.fjb.pojo.brand.BrandInfo;
import com.fjb.pojo.product.ProductDeliveryMode;
import com.fjb.service.product.ProductDeliveryModeService;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * <p>
 * 产品交货方式 前端控制器
 * </p>
 *
 * @author hemiao
 * @since 2019-12-22
 */
@Controller
@RequestMapping("/productDeliveryMode")
public class ProductDeliveryModeController {
	
	@Autowired
	private ProductDeliveryModeService productDeliveryModeService;
	
	/**
	 * @Description:列表查询
	 * @param request
	 * @return
	 * JsonResult<List<ProductDeliveryMode>>
	 * @exception:
	 * @author: hemiao
	 * @time:2020年2月3日 下午8:46:06
	 */
	@RequestMapping(value = "/selectList")
    @ResponseBody
    public JsonResult<List<ProductDeliveryMode>> selectList(HttpServletRequest request){
		QueryWrapper<ProductDeliveryMode> queryWrapper = new QueryWrapper<ProductDeliveryMode>();
		queryWrapper.eq("mode_status", DeliveryModeStatus.STATUS_1.getCode());
		List<ProductDeliveryMode> list = productDeliveryModeService.list(queryWrapper);
        return new JsonResult<List<ProductDeliveryMode>>(list, HttpCode.SUCCESS);
    }
	
}
